package Application.Widgets.Override;

import Application.Utils.StaticUtil;

import javax.swing.*;
import java.awt.event.ActionListener;

public class ButtonOverride extends JButton {
    public ButtonOverride(String text, JComponent component, ActionListener action)
    {
        this.setFont(StaticUtil.config.fontGetter());
        this.setText(text);
        this.addActionListener(action);
        component.add(this);
    }
    public ButtonOverride(String text, JComponent component, String LayoutPlace, ActionListener action)
    {
        this.setFont(StaticUtil.config.fontGetter());
        this.setText(text);
        this.addActionListener(action);
        component.add(this,LayoutPlace);
    }
}
